﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:Cvt="clr-namespace:Huddled.WPF.Converters"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Class="Huddled.PoshConsole.ProgressPanel"
	x:Name="ProgressDisplayPanel"
	Height="Auto" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}">
    <UserControl.Resources>
        <Cvt:FormattingConverter x:Key="formatter" />
    </UserControl.Resources>

	<Grid x:Name="LayoutRoot" Margin="5,5,5,5">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="*"/>
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>
		<ProgressBar Value="{Binding Path=PercentComplete, ElementName=ProgressDisplayPanel, Mode=Default}" Margin="0,0,0,0" Grid.Row="4" x:Name="progressBar" ToolTip="Percent Complete" />
		<Label SnapsToDevicePixels="False" Margin="0,0,0,0" x:Name="activity" ToolTip="Activity" Content="{Binding Path=Activity, ElementName=ProgressDisplayPanel, Mode=Default}" FontSize="16" FontWeight="Bold" Padding="0,0,0,5"/>
		<Label Content="{Binding Path=Status, ElementName=ProgressDisplayPanel, Mode=Default}" IsHitTestVisible="True" SnapsToDevicePixels="False" x:Name="status" ToolTip="Status Description" Padding="10,0,5,5" Grid.Row="1"/>
		<Label Content="{Binding Path=TimeRemaining, Converter={StaticResource formatter}, ConverterParameter='\{0:dd.hh:mm:ss\} Remaining', ElementName=ProgressDisplayPanel, Mode=Default}" SnapsToDevicePixels="False" HorizontalAlignment="Stretch" Margin="0,0,0,0" x:Name="secondsRemaining" ToolTip="Time Remaining" VerticalAlignment="Bottom" Height="26.399" FontFamily="Segoe UI" FontSize="12" FontStretch="ExtraExpanded" FontWeight="Bold" HorizontalContentAlignment="Right" Padding="0,5,0,5" VerticalContentAlignment="Bottom" Grid.Row="3" Grid.RowSpan="1"/>
		<Label SnapsToDevicePixels="False" Margin="0,0,0,0" x:Name="operation" ToolTip="Current Operation" Content="{Binding Path=Operation, ElementName=ProgressDisplayPanel, Mode=Default}" Padding="0,0,0,0" Grid.Row="2"/>
	</Grid>
</UserControl>